wayland: Position popups relative to the parent surface
authorJonas Ådahl <jadahl@gmail.com>
Fri, 22 May 2015 08:39:31 +0000 (16:39 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 10 Jun 2015 02:50:12 +0000 (10:50 +0800)
According to the xdg-shell protocol specification the (x, y) coordinates
passed when creating a popup surface is relative to top left corner of
the parent surface, but prior to this patch, if the parent surface
was an xdg_surface, we'd position it relative to top left corner of the
window geometry of that xdg_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=749717

gdk/wayland/gdkwindow-wayland.c

index 507013c5d51ad132336c288534c3ecd8ad723459..19d92244dd55fc5788dab46972dd517477e5a6b7 100644 (file)
@@ -1108,12 +1108,6 @@ gdk_wayland_window_create_xdg_popup (GdkWindow      *window,
   x = window->x - parent_x;
   y = window->y - parent_y;
 
-  if (parent_impl->xdg_surface)
-    {
-      x -= parent_impl->margin_left;
-      y -= parent_impl->margin_top;
-    }
-
   impl->xdg_popup = xdg_shell_get_xdg_popup (display->xdg_shell,
                                              impl->surface,
                                              parent_impl->surface,